home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2000 February
/
PCWorld_2000-02_cd.bin
/
Software
/
Servis
/
FFE
/
SOUND.SWG
/
0044_FFF & DAT.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1997-05-11
|
5KB
|
118 lines
Simple FFF & DAT file format
==================================================
Version 1.0, from 30.8.1996, ripped from GIPC 1.11
(c)1996 by ChAr
--------------------------------------------------
Notice: This is very simple description, look into sources for more information.
In Version 2.0 software of drivers, there are possible, that some of items
have different meaning, but Gravis didn't release new GIPC for updating...
Use at your own risk...
---------------------------------------------------
FFF soubor - information about patches, all sections described below:
offset, length, description
00000 - 0004 = "FFFF" file header info
00004 - 0004 = dword length whole .FFF - 8 (len of this header)
00000 - 0004 = "CPRT" copyright item identifier
00004 - 0004 = dword 0x2E - length of following datas (in bytes)
00008 - Length = Text copyright with len descr. above
00000 - 0004 = "DATA" patch data item identifier
00004 - 0004 = dword 5+strlen(name) - length of item
00008 - 0004 = iw_disk_id: w major_id=bankNum+0xFF00
w minor_id=0
0000C - strlen = char "FILENAME.DAT", name of linked DAT file
***** - 0001 = char 0x00, end of file name (as in C++)
00000 - 0004 = "ENVP" envelope data item identifier
00004 - 0004 = dword len of envelopeinfo and inserted items
00008 - 0008 = iw_envp: w id.major_id=iw_patch.id.major_id (link to PTCH)
w id.minor_id=layer count for this PTCH
b h.num_envelopes=envelope count (samples in layer)
b h.flags=0
b h.mode=1(drums) || 2(melodic)
b h.index_type=0(drums) || 2(melodic)
00010 - ???? = num_envelopes * iw_envp_record: i nattack=attack envelope points
i nrelease=release envelope points
w sustain_offset
w sustain_rate
w release_rate
b hirange=high MIDI note for envelope
b pad=?? (not initialized!!??)
every iw_envp_record is followed with two arrays of dwords:
d envelope_pointers_attack[nattack] (w rate,offset pair)
d envelope_pointers_release[nrelease] (w rate,offset)
00000 - 0004 = "PROG" program data item identifier
00004 - 0004 = dword len of program info and inserted items
00008 - 0008 = iw_program: w id.id.major_id=0xAA00+patchNum (MIDI number of prg)
w id.id.minor_id=0xAA00+bankNum (GS bank number)
w version.id.major_id=1
w version.id.minor_id=0
00010 - 0004 = "PTCH" id of subsection patch infos
00014 - 0004 = dword len of patch info subsection (0x14)
00018 - 0014 = iw_patch: w id.major_id=0x100+patchNum
w id.minor_id=0x100+bankNum
i nlayers=layer number (more samples at once)
c layer_mode=(program<128)||(nlayers>1)
c exclusion_mode=(exclusion==TRUE)
i exclusion_group=exclude number group
c effect1
c effect1_depth
c effect2
c effect2_depth
b bank=bankNum
b program=patchNum
p layers=NULL(0L)
0002C - = follows iw_patch.nlayers subsection infos about layers
0002C - 0004 = "LAYR" id
00030 - 0004 = dword len of this subsection (0x2C)
00034 - 002C = iw_layer: w id.major_id=iw_patch.id.major_id (link ident.)
w id.minor_id=layer number (0 .. nlayers-1)
c nwaves=number of WAVE subsections in this layer
c flags=0
c high_range=0(drums) or 255(melodic)
c low_range=0
c pan=0x40
c pan_freq_scale=0
LFO tremolo=tremolo infos
LFO vibrato=vibrato infos
c velocity_mode=1
c attenuation=0
i freq_scale=0x400 or 0 when used freq_center
c freq_center=scale_factor MIDI note(root_freq)
c layer_event=1
w penv.id.major_id=0
w penv.id.minor_id=0
w venv.id.major_id=iw_patch.id.major_id (link ident.)
w venv.id.minor_id=layer number
00060 - = foolows iw_layer.nwaves wave subsections
00060 - 0004 = "WAVE" id
00064 - 0004 = dword len of wave subsection (0x25)
00068 - 0025 = iw_wave: w id.major_id=0x200+iw_layer.id.minor_id
w id.minor_id=wave number (0 .. nwaves-1)
d size=wave size (in samples not in bytes!)
d start=start wave offset (SAHI:SALI)
d loopstart=loop wave offset (SASHI:SASLI)
d loopend=loop wave offset (SAEHI:SAELI)
d m_start=0 (?)
d sample_ratio=45158.4/sam_rate*root_frequency
c attenuation=0
c low_note=midi note (low_frequency) || 0(drums)
c high_note=midi note (high_frequency) || 127(drums)
c format=??:BiDirect:LoopOn:LoopFwd:Signed:8bit (7..0)
c m_format=0 (?)
w data_id.major_id=0xFF00+bankNum (.DAT file ident.)
w data_id.minor_id=0
DAT file - data of samples
offset, len, desc
00000 - 0020 = char[20] description of DAT file
00020 - ???? = wave data + 8 bytes of zeros for every sample